{{left_sidebar_enabled,right_sidebar_enabled=False,False}}
{{extend 'layout.html'}}
{{from ndsfunctions import truncquest}}
{{if quests:}}
<h1>My Questions</h1>
<p>These are all the questions you have submitted and they are ordered by submission date and time with the latest first. </p>
<table id='TabAnswers' class='issuetable'>
				<thead>
					<tr>
						<th width="4%">Level</th>
                        <th width="50%">Question</th>
                        <th width="8%">Status</th>
                        <th width="8%">Urgency</th>
                        <th width="10%">Importance</th>
                        <th width="20%">Answer</th>                        
                    </tr>
                </thead>
                    <tbody>
{{for i,row in enumerate(quests):}}
{{if i==items_per_page: break}}
<tr>
<th><a href="{{=URL('viewquest','index',args=[row.id])}}">{{=row.level}}</a></th>
<td>{{=truncquest(row.questiontext)}}</td>
<td>{{=row.status}}</td>
<td>{{=row.urgency}}</td>
<td>{{=row.importance}}</td>
<td>{{=row.correctanstext}}</td>
</tr>
{{pass}}
 </tbody>
</table>
                        
{{if page:}}
<a href="{{=URL(args=[page-1])}}">previous</a>
{{pass}}

{{if len(quests)>items_per_page:}}
<a href="{{=URL(args=[page+1])}}">next</a>
{{pass}}

{{else:}}
<p>You haven't submitted any questions yet.  You can do this <a href="{{=URL('submit','new_question')}}">here</a>  </p>
{{pass}}

{{#block right_sidebar}}
{{#include 'sidebar.html'}}

{{#end}}

<!--
<script>
gvChartInit();
jQuery(document).ready(function(){
   jQuery('#quest').gvChart({
	chartType: 'PieChart',
	gvSettings: {
		vAxis: {title: 'Answers'},
		hAxis: {title: ''},
		width: 300,
		height: 300
		}}); 

});


</script> -->

